import {Component, EventEmitter, HostListener, Input, OnInit, Output} from '@angular/core';

@Component({
  selector: 'app-sku-item-normal',
  templateUrl: './sku-item-normal.component.html',
  styleUrls: ['./sku-item-normal.component.css']
})
export class SkuItemNormalComponent implements OnInit {

  @HostListener('click')
  click(): void {
    this.tapItem.emit(this.data);
  }

  @Input() data: number;

  @Output() tapItem: EventEmitter<any> = new EventEmitter<any>();

  // 图片地址
  src = 'https://resource.smartisan.com/resource/06c2253354096f5e9ebf0616f1af2086.png?x-oss-process=image/resize,w_655/format,webp';

  constructor() {
  }

  ngOnInit() {
  }

}
